package vn.bus.models;

import java.sql.Connection;
import java.util.ArrayList;

import vn.bus.dao.Database;
import vn.bus.dao.QuerieDAO;
import vn.bus.dto.QuerieDTO;;

public class QuerieManager {

	public ArrayList<QuerieDTO> getAllQueries()throws Exception {
		ArrayList<QuerieDTO> allQueries = null;
		try {
			    Database database= new Database();
			    Connection connection = database.Get_Connection();
			    QuerieDAO Queries = new QuerieDAO();
			    allQueries = Queries.getAllQueries(connection);
			    connection.close();
		
		} catch (Exception e) {
			throw e;
		}
		return allQueries;
	}
}
